package com.example.helloworld;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    TextView textView;
    ImageView imageView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textView=(TextView)findViewById(R.id.textView);
        textView.setText(R.string.app_name);
        textView.setTextColor(getResources().getColor(R.color.red));
        textView.setText(getResources().getString(R.string.app_name));
        imageView=(ImageView)findViewById(R.id.imageView);
        imageView.setImageResource(R.drawable.flower);
        imageView.setImageDrawable(getDrawable(R.drawable.picture));
        imageView.setImageDrawable(getResources().getDrawable(R.drawable.tt));
        Log.e("aa","log.e");
        Log.d("aa","log.d");
        Log.w("aa","log.w");
        Log.i("aa","log.i");
        int i=10;
        Log.d("调试信息","变量i的值是："+i);

    }
}
